package annotation_;

/**
 * Created with IntelliJ IDEA.
 * ClassName: Anno
 * Package: annotation_
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-11-27
 * Time: 13:21
 */

public class Anno {
    public static void main(String[] args) {

        Person p1 = new Person();

    }
}

class Person {

    String name;
    int age;

    public void eat() {
        System.out.println("人吃饭");
    }


}

class Student extends Person {

    //注解 修饰 添加之后 显示的校验一下 是不是重写的
    //只能修改方法
    @Override
    public void eat() {
        System.out.println("学生吃饭");
    }
}